inverse function given a point